import datetime
from typing import List, Optional
from click import Option
from pydantic import BaseModel, Field


class RouteSchema(BaseModel):
    id: int = Field(description="自增ID")
    update_time: Optional[datetime.datetime] = Field(description="更新时间")
    path: Optional[str] = Field(description="路径")
    summary: Optional[str] = Field(description="摘要")
    tags: List[str] | List = Field(description="标签")
    description: Optional[str] = Field(description="描述")
    methods: Optional[str] = Field(description="权限")
    endpoint: Optional[str] = Field(description="端点函数")

    class Config:
        from_attributes = True
